package nl.windgazer.arachne.services.messages;

import org.apache.tapestry5.json.JSONObject;

public class InterceptedMessageVO {

	String key;
	String message;
	String property;
	private String live;

	/**
	 * 
	 * @param key The property key under which the property is stored.
	 * @param message The message (formatted).
	 * @param live The message as it is currently seen by visitors.
	 * @param property The unformatted message.
	 */
	public InterceptedMessageVO(String key,
								String message,
								String live,
								String property) {
		this.key = key;
		this.message = message;
		this.live = live;
		this.property = property;
	}

	public String getKey() {
		return key;
	}
	public void setKey(String key) {
		this.key = key;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public String getLive() {
		return live;
	}

	public void setLive(String live) {
		this.live = live;
	}

	public String getProperty() {
		return property;
	}
	public void setProperty(String property) {
		this.property = property;
	}

	public JSONObject toJSON() {
		final JSONObject json = new JSONObject();

		json.put( "key", key );
		json.put("message", message);
		json.put("live", live);
		json.put("property", property);
		
		return json;
	}

}
